<template>
    <div class="playlistcover" >
        <img :src="picUrl" />
        <i class="iconfont icon-erji">{{ formatPlayCount(playCount) }}</i>
        <i class="iconfont icon-bofang3"></i>
    </div>
</template>
<script setup lang="ts">
defineProps<{
    picUrl: string
    playCount: number
}>()
import { formatPlayCount } from "@/utils/formatPlayCount"
</script>
<style lang="scss" scoped>
.playlistcover{
    width: 150px;
    height: 150px;
    position: relative;
}
.playlistcover:hover .icon-bofang3 {
    display: block;
}

.playlistcover:hover img {
    filter: brightness(50%);
    transform: scale(1.07);
}

.playlistcover:hover .icon-erji {
    display: none;
}

img{
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.icon-erji {
    text-align: center;
    width: 70px;
    padding: 0 5px;
    background-color: black;
    border-radius: 10px;
    font-size: 12px;
    color: white;
    position: absolute;
    top: 0px;
    right: 0px;
}

.icon-bofang3 {
    display: none;
    font-size: 40px !important;
    position: absolute;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.icon-bofang3:hover {
    color: rgb(45, 212, 191);
}
</style>